#建立数据库连接
import pandas as pd
import pymysql

conn = pymysql.connect("127.0.0.1","root","123456","reptile",charset="utf8")
print("连接成功")
#读取数据库表数据
data = pd.read_sql("select http_https, ip,port from pr_ip",con=conn)
#数据转化为列表
x = list(data.http_https)
y = list(data.ip)
z = list(data.port)

iplist= []
for i in range(len(data)):
    iplist.append('%s://%s:%s'%(x[i],y[i],z[i]))
    # print('%s://%s:%s'%(x[i],y[i],z[i]))
print(iplist)